﻿using SqlSugar;

namespace OnWork.DataCenter.DAL.DataCenter
{
    /// <summary>
    /// 数据联接
    /// </summary>
    public class DBConn
    {
        /// <summary>
        /// 雪花ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public long id { get; set; }

        /// <summary>
        /// 数据连接名称
        /// </summary>
        public string name { get; set; } = "";

        /// <summary>
        /// 数据库类型
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 初始数据库
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? database { get; set; }

        /// <summary>
        /// 主机地址
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? host { get; set; }

        /// <summary>
        /// 端口号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int port { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int user { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string? password { get; set; }
    }
}